import { request } from './index'

// 产品详情
export function GetDetail (id: number) {
  return request({
    url: `/api/goods/${id}`,
    method: 'get'
  })
}

// 收藏产品
export function IsCollect (id: number) {
  return request({
    url: `/api/collects/goods/${id}`,
    method: 'post'
  })
}

// 购买产品
export function AddCart (data: any) {
  return request({
    url: '/api/carts',
    method: 'post',
    data: data
  })
}
